package com.g13.virtualpethospital.service;

import com.g13.virtualpethospital.common.EntityCommon;
import com.g13.virtualpethospital.entity.base.MultMedia;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;
import java.net.URISyntaxException;
import java.util.List;

/**
 * @Title: MultMediaService
 * @Author yyj1205
 * @Package com.g13.virtualpethospital.service
 * @Date 25/3/2024 20:02
 * @description: 多媒体内容的服务
 */
public interface MultMediaService {
    /**
     * 添加资源，要求文件名不重复
     * @param multipartFile
     * @param type
     */
    public MultMedia addResource(MultipartFile multipartFile, EntityCommon.MultiMediaType type) throws IOException, URISyntaxException;

    /**
     * 删除资源
     * @param name
     * @param type
     */
    public void deleteResource(String name, EntityCommon.MultiMediaType type) throws IOException;

    /**
     * 查找资源的位置，假定文件名称不重复
     * @param name
     * @param type
     * @return
     */
    public List<MultMedia> findResource(String name, EntityCommon.MultiMediaType type) throws IOException, URISyntaxException;
}
